@extends('layouts.header')
@section('content')
@if (Auth::check()) {{-- Only logged users can create subtopics, obv --}}
    <h3><a href="{{ route('new_subtopic') }} " title="Create subtopic">Create new subtopic</a></h3>
@endif
	@foreach($topics as $topic)
		<h2><a href="{{ route('show_topic',['sub'=>$topic->title]) }} " title="Show topic">{{$topic->title}}</a></h2>
        <h5>posts_number({{$topic->posts_number}}) / created in: {{$topic->created_at}} / last update: {{$topic->updated_at}} </h5>
		<br><br>
	@endforeach
@endsection()
